Repository navigation
Conversation
Load exported NEP-spin models and evaluate energy, atomic forces, magnetic forces and the full virial in GPUMD. Add single-process multi-GPU evaluation, per-atom spin input/output and replication, fixed-spin restart output, and group/region magnetic fields. The spin coordinates remain fixed under ordinary supported lattice integration. No spin integrator, spin velocity, or lattice-thermostat checkpoint state is introduced. Runtime and training reuse the descriptor kernels from part 1.
This was referenced Oct 26, 2026
Preserve the existing PR history while carrying prerequisite Spin fixes and the reduced regression suites into this stage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Load current
model nep_spin,spin_version 1models in GPUMD and evaluate energy, atomic force, magnetic force and the full virial. Support fixed spins undernve/nvt_nhc, single-process multi-GPU evaluation, spin XYZ input/output, replication, fixed-spin restart, and group/region magnetic fields.Atoms excluded by
spin_typecontribute their geometry with zero effective spin and zero magnetic force. The runtime reads the shared typed model representation directly and reuses the training descriptor kernels.Scope
Part 2 of six. Part 1 (#1851) is merged; this branch now includes master
b9d6f89e6658ffed4a249d5eecc9d050bf58465a. The diff against master contains this runtime extension only.force/nep_spin/. Expose two host launch functions for existing structural force kernels; the CUDA kernels remain internal.Spin integrators and coupled relaxation remain in #1853, #1854, #1855 and #1856.
Validation
Validated on Sai with four V100 GPUs, CUDA 12.9.1,
sm_70, and the Makefile's C++14 mode; C++17-extension diagnostics were promoted to errors. Baselinegpumdandnepwere freshly built from masterb9d6f89. Validation of9868aaafeca6982d70444c2cfb5450e6fa911038:qnep_pppm_future_bec: onethermo.outfield differs by1.0e-6against an absolute tolerance of1.0e-7. It occurred in both full runs. Five isolated upstream self-comparisons and five interleaved repetitions each of upstream/upstream, upstream/candidate and candidate/candidate all passed on other allocated nodes. QNEP source and test tolerances are unchanged; the cause is not established and the full-suite failure remains open.-W --keep-going) and the diff whitespace check passed.Reproducible commands: fixed-spin runtime validation and training validation. Numerical tolerances and frozen oracle values are unchanged.
These checks cover implementation correctness, not scientific fit quality or performance. Windows, HIP and WPE execution are not validated here. The separately tracked ordinary-NEP large-YIG multi-GPU discrepancy is outside this PR and is not closed by these checks.